/* @(#)GSLoginAction.java    
*
* Project: BUS
*
* Modify Information:
* =============================================================================
*   Author       Date       Description
*   ------------ ---------- ---------------------------------------------------
*   Simonyi Peng 2006-2-16    建立
*
* Copyright Notice:
* =============================================================================
*    Copyright (c) 2001-2006 Beijing HiTRUST Technology Co., Ltd. 1808 Room, 
*        Science & Technology Building, No. 9 South Street, Zhong Guan Cun, 
*        Haidian District, Beijing ,100081, China All rights reserved.
*
*    This software is the confidential and proprietary information of
*        Beijing HiTRUST Technology Co., Ltd. ("Confidential Information").
*        You shall not disclose such Confidential Information and shall use it
*        only in accordance with the terms of the license agreement you entered
*        into with HiTRUST.
*
* Warning:
* =============================================================================
* 
*/
package com.hitrust.gs.action;

import java.util.ArrayList;
import com.hitrust.gs.bean.GSOperatorBean;
import com.hitrust.gs.business.GSOrgProcessor;
import com.hitrust.gs.business.GSOrderProcesser;
import com.hitrust.gs.form.GSOrderAdvicesForm;
import com.hitrust.gs.lib.GSBaseConstants;
import com.hitrust.gs.service.GSBaseAction;
import com.hitrust.gs.service.GSBaseForm;


public class GSOrderReviewSimpleAction extends GSBaseAction {
	public String execute(GSBaseForm aForm) throws Exception {
	    
	    GSOperatorBean operatorBean = (GSOperatorBean)aForm.getSession().getAttribute(GSBaseConstants.LOGIN);
        
        GSOrgProcessor orgproc = new GSOrgProcessor ();
        GSOrderProcesser ordproc = new GSOrderProcesser();
        try{
	        //ArrayList ary = orgproc.getOperOrgAndSubOrg(operatorBean.getGs_oper_org_id());
	        
	        GSOrderAdvicesForm tForm = (GSOrderAdvicesForm)aForm;
	        String orderId = "";//tForm.getOrderId();
	        String msg = tForm.getAuditcontent();

	        String indexs[] = {orderId};
	        String isConfirmOrReject = aForm.getRequest().getParameter("confirmorreject");
	        boolean isConfirmOrRejectBoolean = false;
	        if("T".equals(isConfirmOrReject)){
	            isConfirmOrRejectBoolean = true;
	        }else{
	            isConfirmOrRejectBoolean = false;
	        }
	        ordproc.auditOrder(indexs,operatorBean.getGs_oper_id(),1,isConfirmOrRejectBoolean,false,msg);
	        //返回到qryaction时，给出是否重新查询的指示
	        //aForm.getRequest().setAttribute("isReQry","F");
	        //GSOrderReviewQueryAction action = new GSOrderReviewQueryAction();
	        //return action.execute(aForm);
	        aForm.getRequest().setAttribute("MSG","申购单复审成功");
	        return GSBaseConstants.FORWARD_SUCCESS;
        
        
		}catch (Exception e) {
            aForm.getRequest().setAttribute("action", "A100901.do");
            throw e;
        }
	}
}
